import request from '@/config/axios'

// 软件开发管理 VO
export interface SoftwareDevelopmentVO {
  id: number // 主键ID
  title: string // 需求名称
  typeId: number // 需求类别ID
  description: string // 描述/尺寸
  num: number // 数量
  day: number // 人天
  gongyingshang: string // 供应商名称
  money: number // 预算成本
  createdAt: Date // 需求时间
}

// 软件开发管理 API
export const SoftwareDevelopmentApi = {
  // 查询软件开发管理分页
  getSoftwareDevelopmentPage: async (params: any) => {
    return await request.get({ url: `/shuhu/software-development/page`, params })
  },

  // 查询软件开发管理详情
  getSoftwareDevelopment: async (id: number) => {
    return await request.get({ url: `/shuhu/software-development/get?id=` + id })
  },

  // 新增软件开发管理
  createSoftwareDevelopment: async (data: SoftwareDevelopmentVO) => {
    return await request.post({ url: `/shuhu/software-development/create`, data })
  },

  // 修改软件开发管理
  updateSoftwareDevelopment: async (data: SoftwareDevelopmentVO) => {
    return await request.put({ url: `/shuhu/software-development/update`, data })
  },

  // 删除软件开发管理
  deleteSoftwareDevelopment: async (id: number) => {
    return await request.delete({ url: `/shuhu/software-development/delete?id=` + id })
  },

  // 导出软件开发管理 Excel
  exportSoftwareDevelopment: async (params) => {
    return await request.download({ url: `/shuhu/software-development/export-excel`, params })
  }
}